home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source1.lha / source / amiga / BattMem.mod < prev    next >
Encoding:
Text File  |  1995-01-26  |  5.2 KB  |  218 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: BattMem.mod $
  4.   Description: Interface to battmem.resource
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.7 $
  8.       $Author: fjc $
  9.         $Date: 1995/01/26 02:39:55 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  23.  
  24. MODULE [2] BattMem;
  25.  
  26. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  27. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  28.  
  29. IMPORT SYS := SYSTEM, e := Exec;
  30.  
  31.  
  32. (*
  33. **      $VER: battmem.h 36.4 (1.5.90)
  34. **
  35. **      BattMem resource name strings.
  36. *)
  37.  
  38. CONST
  39.  
  40.   battMemName * = "battmem.resource";
  41.  
  42.  
  43. (*
  44. **      $VER: battmembitsamiga.h 39.3 (14.9.92)
  45. **
  46. **      BattMem Amiga specific bit definitions.
  47. *)
  48.  
  49.  
  50. (*
  51.  * Amiga specific bits in the battery-backedup ram.
  52.  *
  53.  *      Bits 0 to 31, inclusive
  54.  *)
  55.  
  56. (*
  57.  * AmigaAmnesia
  58.  *
  59.  *              The battery-backedup memory has had a memory loss.
  60.  *              This bit is used as a flag that the user should be
  61.  *              notified that all battery-backed bit have been
  62.  *              reset and that some attention is required. Zero
  63.  *              indicates that a memory loss has occured.
  64.  *)
  65.  
  66.   amigaAmnesiaAddr      * = 0;
  67.   amigaAmnesiaLen       * = 1;
  68.  
  69.  
  70. (*
  71.  * scsiTimeout
  72.  *
  73.  *              adjusts the timeout value for SCSI device selection.  A
  74.  *              value of 0 will produce short timeouts (128 ms) while a
  75.  *              value of 1 produces long timeouts (2 sec).  This is used
  76.  *              for SeaCrate drives (and some Maxtors apparently) that
  77.  *              don`t respond to selection until they are fully spun up
  78.  *              and intialised.
  79.  *)
  80.  
  81.   scsiTimeoutAddr       * = 1;
  82.   scsiTimeoutLen        * = 1;
  83.  
  84.  
  85. (*
  86.  * scsiLuns
  87.  *
  88.  *              Determines if the controller attempts to access logical
  89.  *              units above 0 at any given SCSI address.  This prevents
  90.  *              problems with drives that respond to ALL LUN addresses
  91.  *              (instead of only 0 like they should).  Default value is
  92.  *              0 meaning don't support LUNs.
  93.  *)
  94.  
  95.   scsiLunsAddr          * = 2;
  96.   scsiLunsLen           * = 1;
  97.  
  98.  
  99. (*
  100. **      $VER: battmembitsamix.h 1.1 (25.5.90)
  101. **
  102. **      BattMem Amix specific bit definitions.
  103. *)
  104.  
  105.  
  106. (*
  107.  *      See Amix documentation for these bit definitions
  108.  *
  109.  *      Bits 32 to 63, inclusive
  110.  *)
  111.  
  112. (*
  113. **      $VER: battmembitsshared.h 39.2 (4.6.93)
  114. **
  115. **      BattMem shared specific bit definitions.
  116. *)
  117.  
  118.  
  119. (*
  120.  * Shared bits in the battery-backedup ram.
  121.  *
  122.  *      Bits 64 and above
  123.  *)
  124.  
  125. (*
  126.  * sharedAmnesia
  127.  *
  128.  *              The battery-backedup memory has had a memory loss.
  129.  *              This bit is used as a flag that the user should be
  130.  *              notified that all battery-backed bit have been
  131.  *              reset and that some attention is required. Zero
  132.  *              indicates that a memory loss has occured.
  133.  *)
  134.  
  135.   sharedAmnesiaAddr     * = 64;
  136.   sharedAmnesiaLen      * = 1;
  137.  
  138.  
  139. (*
  140.  * scsiHostID
  141.  *
  142.  *              a 3 bit field (0-7) that is stored in complemented form
  143.  *              (this is so that default value of 0 really means 7)
  144.  *              It's used to set the A3000 controllers SCSI ID (on reset)
  145.  *)
  146.  
  147.   scsiHostIdAddr       * = 65;
  148.   scsiHostIdLen        * = 3;
  149.  
  150.  
  151. (*
  152.  * scsiSyncXfer
  153.  *
  154.  *              determines if the driver should initiate synchronous
  155.  *              transfer requests or leave it to the drive to send the
  156.  *              first request.  This supports drives that crash or
  157.  *              otherwise get confused when presented with a sync xfer
  158.  *              message.  Default=0=sync xfer not initiated.
  159.  *)
  160.  
  161.   scsiSyncXferAddr     * = 68;
  162.   scsiSyncXferLen      * = 1;
  163.  
  164. (*
  165.  * scsiFastSync
  166.  *
  167.  *              determines if the driver should initiate fast synchronous
  168.  *              transfer requests (>5MB/s) instead of older <=5MB/s requests.
  169.  *              Note that this has no effect if synchronous transfers are not
  170.  *              negotiated by either side.
  171.  *              Default=0=fast sync xfer used.
  172.  *)
  173.  
  174.   scsiFastSyncAddr * = 69;
  175.   scsiFastSyncLen * = 1;
  176.  
  177. (*
  178.  * scsiTagQueues
  179.  *
  180.  *              determines if the driver should use SCSI-2 tagged queuing
  181.  *              which allows the drive to accept and reorder multiple read
  182.  *              and write requests.
  183.  *              Default=0=tagged queuing NOT enabled
  184.  *)
  185.  
  186.   scsiTagQueuesAddr * = 70;
  187.   scsiTagQueuesLen * = 1;
  188.  
  189.  
  190. (**-- Resource Base variable --------------------------------------------*)
  191.  
  192. VAR
  193.  
  194.   base * : e.APTR;
  195.  
  196.  
  197. (**-- Resource Functions ------------------------------------------------*)
  198.  
  199. (*
  200. **      $VER: battmem_protos.h 1.5 (4.3.91)
  201. *)
  202.  
  203. PROCEDURE ObtainBattSemaphore* [base,-6] ();
  204. PROCEDURE ReleaseBattSemaphore* [base,-12] ();
  205. PROCEDURE ReadBattMem* [base,-18]
  206.   ( VAR buffer [8] : ARRAY OF SYS.BYTE;
  207.     offset     [0] : e.ULONG;
  208.     length     [1] : e.ULONG )
  209.   : e.ULONG;
  210. PROCEDURE WriteBattMem* [base,-24]
  211.   ( buffer [8] : ARRAY OF SYS.BYTE;
  212.     offset [0] : e.ULONG;
  213.     length [1] : e.ULONG )
  214.   : e.ULONG;
  215.  
  216. BEGIN base := NIL
  217. END BattMem.
  218.